Skip to content

Add vep sample#2384

Open
boscoliveira wants to merge 6 commits intovarfish-org:mainfrom
boscoliveira:add-vep-sample
Open

Add vep sample#2384
boscoliveira wants to merge 6 commits intovarfish-org:mainfrom
boscoliveira:add-vep-sample

Conversation

@boscoliveira
Copy link

@boscoliveira boscoliveira commented Aug 8, 2025

Summary by CodeRabbit

  • New Features
    • Added new variant annotation files, including a VCF file with detailed consequence annotations and two VEP output files with variant effect predictions and clinical significance information. These files provide comprehensive variant data and annotation details for end-users.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 8, 2025

Walkthrough

Three new files have been added under the VEP directory: a VCF file with Ensembl VEP annotations for multiple variants, and two VEP output files containing variant annotation results for single variants. All files include detailed variant consequence annotations, allele frequencies, and clinical significance information.

Changes

Cohort / File(s) Change Summary
VCF with VEP Annotations
VEP/HG008-T_vs_HG008-N-D.tnscope_VEP.ann.vcf
Added a VCF v4.2 file with Ensembl VEP consequence annotations for three variants, including INFO field definitions and clinical significance.
VEP Output - Full and Small
VEP/sample_vep.txt, VEP/sample_vep_small.txt
Added two VEP output files, each with metadata, command details, and a single variant annotation for COL5A2, including consequence, allele frequency, and clinical significance.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

Hopping through the VEP files,
New variants found in tidy piles.
With alleles, genes, and consequence,
Each annotation makes more sense.
From clinical tags to gnomAD flair,
A bunny’s joy is data to share! 🐇✨

Note

🔌 MCP (Model Context Protocol) integration is now available in Early Access!

Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🔭 Outside diff range comments (2)
VEP/sample_vep.txt (1)

6-6: Remove stray trailing character line.

There's a lone "6" at the end of the file. This will confuse simple TSV parsers and is likely accidental.

Apply this diff to remove it:

-6
+
VEP/sample_vep_small.txt (1)

6-6: Remove stray trailing character line.

Identical issue as in sample_vep.txt: a lone "6" at EOF will break parsing.

Apply this diff to remove it:

-6
+
🧹 Nitpick comments (1)
VEP/HG008-T_vs_HG008-N-D.tnscope_VEP.ann.vcf (1)

1-4: Optional: add contig headers for stricter validators.

Consider adding ##contig lines for referenced chromosomes (e.g., 2, 17) to satisfy tools that expect them for GRCh38.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5e5876c and 9dc5248.

📒 Files selected for processing (3)
  • VEP/HG008-T_vs_HG008-N-D.tnscope_VEP.ann.vcf (1 hunks)
  • VEP/sample_vep.txt (1 hunks)
  • VEP/sample_vep_small.txt (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: holtgrewe
PR: varfish-org/varfish-server#1957
File: backend/external-copy-0.vcf:0-0
Timestamp: 2024-10-10T10:46:51.742Z
Learning: In the Varfish server repository, some VCF files like `backend/external-copy-0.vcf` contain example data. It's acceptable for these files to include absolute paths in their VCF headers.
📚 Learning: 2024-10-10T10:46:51.742Z
Learnt from: holtgrewe
PR: varfish-org/varfish-server#1957
File: backend/external-copy-0.vcf:0-0
Timestamp: 2024-10-10T10:46:51.742Z
Learning: In the Varfish server repository, some VCF files like `backend/external-copy-0.vcf` contain example data. It's acceptable for these files to include absolute paths in their VCF headers.

Applied to files:

  • VEP/HG008-T_vs_HG008-N-D.tnscope_VEP.ann.vcf
🔇 Additional comments (1)
VEP/sample_vep.txt (1)

2-3: Absolute paths in sample metadata are acceptable here.

The cache path and command metadata look fine for sample data in this repo (see prior acceptance of absolute paths in sample VCF headers).

#CHROM POS ID REF ALT QUAL FILTER INFO
17 43094464 rs80357914 C T . PASS CSQ=T|missense_variant|BRCA1|ENSG00000012048|NM_007294.4|Transcript|NM_007294.4:c.5266C>T|p.Arg1756His|0.00001|likely_pathogenic
2 189873659 rs123456789 A T . PASS CSQ=T|splice_region_variant|COL5A2|ENSG00000163083|NM_000393.5|Transcript|NM_000393.5:c.1158+5A>T|-|0.0001|uncertain_significance
17 3634395 rs987654321 GAT G . PASS CSQ=T|inframe_deletion|CTNS|ENSG00000103175|NM_004937.3|Transcript|NM_004937.3:c.614_616del|p.Asp205del|0.0008|pathogenic
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

❓ Verification inconclusive

CSQ Allele does not match ALT (data correctness).

For this record, REF=GAT and ALT=G, but CSQ starts with T as the Allele. The CSQ Allele field must match ALT.

Apply this diff to fix the allele:

-17	3634395	rs987654321	GAT	G	.	PASS	CSQ=T|inframe_deletion|CTNS|ENSG00000103175|NM_004937.3|Transcript|NM_004937.3:c.614_616del|p.Asp205del|0.0008|pathogenic
+17	3634395	rs987654321	GAT	G	.	PASS	CSQ=G|inframe_deletion|CTNS|ENSG00000103175|NM_004937.3|Transcript|NM_004937.3:c.614_616del|p.Asp205del|0.0008|pathogenic

Optional quick check to validate CSQ Allele equals ALT for all records (assumes single ALT and single CSQ entry per record):


🏁 Script executed:

#!/bin/bash
awk -F'\t' 'BEGIN{err=0} !/^#/ {
  alt=$5;
  info=$8;
  csq="";
  n=split(info,a,";");
  for(i=1;i<=n;i++){ if(a[i] ~ /^CSQ=/){ csq=substr(a[i],5); break } }
  if(csq=="") next;
  split(csq,f,"|");
  allele=f[1];
  if(allele!=alt){ 
    printf("Allele mismatch at %s:%s ALT=%s CSQ_Allele=%s\n",$1,$2,alt,allele) > "/dev/stderr"; 
    err=1 
  }
} END{ exit err }' VEP/HG008-T_vs_HG008-N-D.tnscope_VEP.ann.vcf

Length of output: 459


Fix CSQ Allele mismatch

Verification confirmed a CSQ Allele of “T” does not match the ALT (“G”) at chr17:3634395. Update the CSQ field to use the ALT allele:

• File: VEP/HG008-T_vs_HG008-N-D.tnscope_VEP.ann.vcf
• Location: record at 17:3634395

Diff:

-17	3634395	rs987654321	GAT	G	.	PASS	CSQ=T|inframe_deletion|CTNS|ENSG00000103175|NM_004937.3|Transcript|NM_004937.3:c.614_616del|p.Asp205del|0.0008|pathogenic
+17	3634395	rs987654321	GAT	G	.	PASS	CSQ=G|inframe_deletion|CTNS|ENSG00000103175|NM_004937.3|Transcript|NM_004937.3:c.614_616del|p.Asp205del|0.0008|pathogenic
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
17 3634395 rs987654321 GAT G . PASS CSQ=T|inframe_deletion|CTNS|ENSG00000103175|NM_004937.3|Transcript|NM_004937.3:c.614_616del|p.Asp205del|0.0008|pathogenic
17 3634395 rs987654321 GAT G . PASS CSQ=G|inframe_deletion|CTNS|ENSG00000103175|NM_004937.3|Transcript|NM_004937.3:c.614_616del|p.Asp205del|0.0008|pathogenic
🤖 Prompt for AI Agents
In VEP/HG008-T_vs_HG008-N-D.tnscope_VEP.ann.vcf at line 7, the CSQ field allele
"T" does not match the ALT allele "G" for the variant at chr17:3634395. Update
the CSQ field to replace the allele "T" with the correct ALT allele "G" to
ensure consistency between the CSQ annotation and the ALT allele.

Comment on lines +1 to +5
## VEP output generated at 2025-01-28 19:30:00
## Using cache in /cache
## Command: vep --input_file variant_input.txt --output_file variant_output.txt --format vcf --tab --force_overwrite --species homo_sapiens --assembly GRCh38 --offline --cache --symbol --hgvs --hgvsc --hgvsp --af_gnomad --clin_sig
#Uploaded_variation Location Allele Gene Feature Feature_type Consequence cDNA_position CDS_position Protein_position Amino_acids Codons Existing_variation Extra HGVSc HGVSp gnomAD_AF CLIN_SIG
COL5A2_variant 2:189873659 T COL5A2 NM_000393.5 Transcript splice_region_variant 1158+5 - - - - rs123456789 SYMBOL=COL5A2;SYMBOL_SOURCE=HGNC;HGNC_ID=HGNC:2210 NM_000393.5:c.1158+5A>T - 0.0001 uncertain_significance
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Avoid duplicating identical sample files.

This file is identical to VEP/sample_vep.txt. Consider keeping only one sample (or documenting how they differ) to prevent divergence over time.

Quick check for duplication:


🏁 Script executed:

#!/bin/bash
diff -u VEP/sample_vep.txt VEP/sample_vep_small.txt || true

Length of output: 53


🏁 Script executed:

#!/bin/bash
# Verify that both sample files exist and compare their sizes, hashes, and first few lines

# Check for existence
echo "Checking file existence:"
ls -l VEP/sample_vep.txt VEP/sample_vep_small.txt || exit 1

# Compare file sizes
echo -e "\nFile sizes:"
stat --format="%n %s bytes" VEP/sample_vep.txt VEP/sample_vep_small.txt

# Compute MD5 hashes
echo -e "\nMD5 checksums:"
md5sum VEP/sample_vep.txt VEP/sample_vep_small.txt

# Show first 5 lines of each
echo -e "\nFirst 5 lines of sample_vep.txt:"
head -n 5 VEP/sample_vep.txt

echo -e "\nFirst 5 lines of sample_vep_small.txt:"
head -n 5 VEP/sample_vep_small.txt

Length of output: 2333


Consolidate duplicate sample files in VEP/
Our checks confirmed that VEP/sample_vep.txt and VEP/sample_vep_small.txt are byte-for-byte identical. To prevent them drifting apart over time, please keep only one of these samples (or explicitly document any intended differences).

• Remove or archive one of:

  • VEP/sample_vep.txt
  • VEP/sample_vep_small.txt
🤖 Prompt for AI Agents
In VEP/sample_vep_small.txt around lines 1 to 5, the file is byte-for-byte
identical to VEP/sample_vep.txt, causing unnecessary duplication. To fix this,
remove or archive one of these files to prevent them from drifting apart over
time, keeping only a single canonical sample file or clearly documenting any
intended differences if both are to be retained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants